---
title: Overview
description: Ratelimit your serverless functions.
mode: "wide"
---


Serverless functions offer a ton of benefits but unfortunately make some things much harder too.
Ratelimiting is one of these things as it requires some persistent state to coordinate different limits.

Unkey's ratelimit API provides a global low latency solution to limit your functions and protect
upstream services.


## Get your API key

<Steps>
  <Step title="Go to the dashboard">
    1. Sign into your [dashboard](https://app.unkey.com). 
    2. Navigate to the `Settings` in the sidebar and click `Root Keys` in the sub menu.
    3. Click `+ New root key` at the top right of the page.
  
  </Step>
  <Step title="Enter a name">
    You can give your key a name to make it easier to find later, but that's optional.
  </Step>
  <Step title="Add permissions">
    Your key needs at least these permissions:
    - `create_namespace`
    - `limit`

  <Frame>
  <img src="/ratelimiting/create-root-key-permissions.png"/>
  </Frame>


  After selecting both permissions, click `Create New Key` at the bottom of the modal and copy the generated key to your `.env` file.
  For security reasons, this key can not be shown again. In case you lose it, you need to create a new one.
  <Frame>

      <img src="/ratelimiting/copy-key.png"/>

  </Frame>
  </Step>

</Steps>

## Ratelimit your functions

<Info>
We're currently only offering a Typescript SDK but you can check out the [api reference](/api-reference/v2/overview) and do the network call manually if you are using another language.
Also please let us know what language you're using, so we can prioritize adding support for it.
</Info>


Please follow the [@unkey/ratelimit](/libraries/ts/ratelimit) documentation for setup and configuration options.
